#pragma once
#include "moogle.h"
#include <gtkglmm.h>

namespace moogle
{
  class scene;

  class scene_view : public Gtk::GL::DrawingArea
  {
    scene* _scene;

  public:
    scene_view(const Glib::RefPtr<const Gdk::GL::Config>&, scene*);
    virtual ~scene_view();

    virtual void on_realize();

    // Emitted to size, position, and stack order events
    virtual bool on_configure_event(GdkEventConfigure* event);

    // Emitted to redraw part of a window
    virtual bool on_expose_event(GdkEventExpose* event);

    scene* get_scene();
    void set_scene(scene*);

  private:
    void render();
  };
}
